﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevComponents.DotNetBar;

namespace PlanningGIS.Manager
{
    /// <summary>
    /// 新增角色
    /// </summary>
    public partial class FrmAddRole : DevComponents.DotNetBar.Metro.MetroForm
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        public FrmAddRole()
        {
            InitializeComponent();
        }

        /// <summary>
        /// 加载窗体
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void FrmRole_Load(object sender, EventArgs e)
        {

        }

        /// <summary>
        /// 获取或设置角色的名称
        /// </summary>
        public string RoleName
        {
            get { return txtName.Text.Trim(); }
            set { txtName.Text = value; }
        }

        /// <summary>
        /// 确定
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnOK_Click(object sender, EventArgs e)
        {
            this.DialogResult = System.Windows.Forms.DialogResult.OK;
            this.Close();
        }

        /// <summary>
        /// 取消
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
            this.Close();
        }
    }
}